package com.yonyou.pmclouds.project.rmiitf;

import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.project.entity.ProjectUpdateViewVO;
import com.yonyou.pmclouds.project.entity.ProjectVO;
import com.yonyou.pmclouds.project.entity.ProjectViewVO;

import java.util.Date;

/**
 * 项目信息维护接口
 *
 * @author mapeif
 */
public interface ProjectMaintain {


    String insert(ProjectVO project) throws BusinessException;

    String update(ProjectVO project) throws BusinessException;

    String updateProjectInfo(ProjectUpdateViewVO projectUpdateViewVO) throws BusinessException;

    /**
     * 为了开启事务，只能起名字update了。。。
     * 项目结束，由于业务逻辑变更，不再使用项目停止。。
     * @since 2.4
     * */
    @Deprecated
    String updateEnd(String pkProject, String changeFlag, Date endDate, String operator, String description) throws BusinessException;

    /**
     * 停工单回写预计复工日期
     * @param pkProject
     * @param preWorkResumeDate
     * @return
     * @throws BusinessException
     */
    String updatePreWorkResumeDate(String pkProject, Date preWorkResumeDate,Date stopDate) throws BusinessException;

    String updateEndDateForAcceptance(String pkProject, Date acceptDate) throws BusinessException;

    String updateForNCBillDriven(String pkProject, String pkSrcStatus) throws BusinessException;

    /**
     * 复工单回写累计停工天数
     * @param pkProject
     * @param workStopDays
     * @return
     * @throws BusinessException
     */
    String updateWorkStopDays(String pkProject, Integer workStopDays) throws BusinessException;

    String delete(String pkProject, String changeFlag, String operator) throws BusinessException;

    ProjectViewVO insert(ProjectViewVO projectViewVO)  throws BusinessException;


    String updateAuth(ProjectVO project,boolean needValidateAuth) throws BusinessException;
}
